# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=sddm-kcm
pkgver=5.19.4
pkgrel=0
pkgdesc="Config module for SDDM"
arch="all !armhf" # armhf blocked by qt5-qtdeclarative
url="https://www.kde.org"
license="GPL-2.0-or-later AND (GPL-2.0-only OR GPL-3.0-only) AND LGPL-2.1-or-later AND GPL-2.0-only"
depends="sddm systemsettings"
makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qtx11extras-dev qt5-qtdeclarative-dev kcoreaddons-dev ki18n-dev kxmlgui-dev kauth-dev kconfigwidgets-dev kio-dev karchive-dev knewstuff-dev xcb-util-image-dev libxcursor-dev"
source="https://download.kde.org/stable/plasma/$pkgver/sddm-kcm-$pkgver.tar.xz"
subpackages="$pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="cb96dfc058bd02968d5847a66ff63e88951ac81e8cc2523b0b0474748d17ab182bc83124d2bd6a7a4af82259e332fc183db94be0e23cdf13d10571449b406cdd  sddm-kcm-5.19.4.tar.xz"
